< previous page page_140 next page >

Page 140
12181-0140a.gif
Figure 5.7.
The new class with all of the defined properties listed.
12181-0140b.gif
Figure 5.8.
You add a new method by using the
Method Builder dialog box.
After you enter the name for the method, you must add any arguments that will be passed to the routine. No arguments are needed for this method. Click OK to add the method. The last step in this process is to add the two events to allow the calling application to take action if the age calculated is either over or under the age limit set. Again, right-click the class name and choose New, Event from the pop-up menu to display the Event Builder dialog box as shown in Figure 5.9.
As in the method, there are no arguments for this event, so enter the name and click OK to complete the task. If you click the All tab in the Class Builder dialog box, you will see all of the objects that you have added to the class (see Figure 5.10). You now are ready to add the class module to your application. Select File, Exit from the menu, and click Yes to add the class module code to your application.

 
< previous page page_140 next page >

If you like this book, buy it!